#!/usr/bin/env python
# coding: utf-8

# 对于给定字符串`s`，删除所有重复的单词
# 
# 输入：字符串`s='hello world and practice makes perfect and hello world again'`
# 
# 要求：对单词进行排序后(a->z)，将这些单词以**空格分隔**的形式打印在**一行**上。
# 
# 预期输出：`again and hello makes perfect practice world`

# In[1]:


s='hello world and practice makes perfect and hello world again'
word = s.split()
[word.remove(i) for i in word if word.count(i) > 1]
word.sort()
print(" ".join(word))

